/*
 * @Description: 
 * @Author: huacong
 * @Date: 2020-04-17 15:20:10
 * @LastEditTime: 2020-11-03 11:29:14
 * @LastEditors: huacong
 */ 
import { axios } from '@/utils/http/request'
import { makeFormData } from '@/utils/util'

// 获取待处理信息
export function getPending(type, params={}) {
  const url = ['getProcessingWarning', 'getProcessingAppeal' , 'getProcessingVideoRecog', 'getCureItemAppeal', 'getPunishmentAppeal']
  return axios({
    url: 'medical/console/'+ url[type] +'.jspx',
    method: 'get',
    params
  })
}

// 获取预警列表
export function getWarnList (params={}) {
  return axios({
    url: 'medical/console/getWarningList.jspx',
    method: 'post',
    params
  })
}

// 获取预警排名
export function getWarnRank () {
  return axios({
    url: 'medical/console/getWarningRanking.jspx',
    method: 'get'
  })
}

// 各场景认证/签到率趋势
export function getRecogSigninData (statisticalMethods=1) {
  return axios({
    url: 'medical/console/getRecogSigninData.jspx',
    method: 'get',
    params:{statisticalMethods}
  })
}

// 1:住院入科认证率 2:购药认证率 3: 诊疗核销率
export function getRank (type) {
  let url = ['getMedicalRecogRanking', 'getPharmacyRecogRanking', 'getCureSigninRanking', 'getOutServiceRanking']
  return axios({
    url: 'medical/console/'+ url[type - 1] +'.jspx',
    method: 'GET'
  })
}

// 获取通知
export function getMsgList (params={}, data) {
  let form_Data = new FormData();
  makeFormData(data,form_Data);
  return axios({
    url: 'medical/console/getMsgForVue.jspx',
    method: 'post',
    params,
    data: form_Data
  })
}

// 获取快捷通道
export function getFastMenu () {
  return axios({
    url: 'medical/console/getFastMenu.jspx',
    method: 'get'
  })
}
